package com.fh.shop.api.book.po;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

@Data
@ApiModel
public class Book implements Serializable {
   @ApiModelProperty(value = "图书ID",example = "0")
   private Long id;

   @ApiModelProperty(value = "图书名称",required = true)
   private String bookName; //图书名称

   @ApiModelProperty(value = "作者名称",required = true)
   private String author;   //作者名称

   @ApiModelProperty("出版日期")
   @DateTimeFormat(pattern = "yyyy-MM-dd")
   @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
   private Date createDate;   //出版日期

   @ApiModelProperty(value = "价格",example = "0")
   private BigDecimal price;  //价格

}
